import request from '@/utils/request'
// 预览pdf
export function getPreviewUrl(path, id) {
    return request({
        url: `/common/preview/${path}/${id}`,
        method: 'get',
        responseType: 'blob',
    })
}

export function checkFileExits(path, id) {
    return request({
        url: `/common/checkFileExits/${path}/${id}`,
        method: 'get',
    })
}

export function getFileUrl(query) {
    return request({
        url: '/common/getFileUrl',
        method: 'get',
        params: query
    })
}

export function getPreviewDetail(data) {
    return request({
        url: '/train/attachment/preview',
        method: 'POST',
        data: data
    })
}
